package it.polimi.traveldream.ejbclient.eaos;

import it.polimi.traveldream.ejbclient.dtos.TravelPackageDTO;

import it.polimi.traveldream.utils.enums.PackageSearchType;
import it.polimi.traveldream.utils.exceptions.JustInUseException;
import it.polimi.traveldream.utils.exceptions.NotSuchProductException;

import java.util.List;

import javax.ejb.Local;

@Local
public interface TravelPackageServiceEAO {
	public List<TravelPackageDTO> searchPackage(PackageSearchType type, String keyword)
			throws NotSuchProductException;
	public List<TravelPackageDTO> getAvailablePackages(); 
	public List<TravelPackageDTO> getPackages(boolean overpast);
	public TravelPackageDTO getPackage(int packageId) throws NotSuchProductException;
	public boolean isAvailableFor(int packageId, int reservations)
			throws NotSuchProductException;
	public boolean isOverpast(int packageId)
			throws NotSuchProductException;
	public boolean notExpired(int packageId)
			throws NotSuchProductException;
	public int addPackage(TravelPackageDTO travelPackage);
	public void deletePredefinedPackage(int packageId)
			throws NotSuchProductException, JustInUseException;
	public boolean justParticipatedPackage(int packageId)
			throws NotSuchProductException;
}
